﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.MicroKernel.Registration;
using Castle.Windsor;

namespace RrslLite.Extensions
{
	public static class WindsorContainerExtension
	{
		public static IWindsorContainer Register<TInterface, TService>(this IWindsorContainer container)
			where TService : class, TInterface
			where TInterface : class
		{
			return container.Register(Component.For<TInterface>().Named(typeof(TInterface).Name).ImplementedBy<TService>());
		}
	}
}
